package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.markup_level_agent_price;
import com.ymttest.database.model.godmch.markup_level_agent_priceExample;
import com.ymttest.database.model.godmch.markup_level_agent_priceKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface markup_level_agent_priceMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_level_agent_price
     *
     * @mbggenerated Fri Jul 17 18:25:20 CST 2020
     */
    @SelectProvider(type=markup_level_agent_priceSqlProvider.class, method="countByExample")
    int countByExample(markup_level_agent_priceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_level_agent_price
     *
     * @mbggenerated Fri Jul 17 18:25:20 CST 2020
     */
    @DeleteProvider(type=markup_level_agent_priceSqlProvider.class, method="deleteByExample")
    int deleteByExample(markup_level_agent_priceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_level_agent_price
     *
     * @mbggenerated Fri Jul 17 18:25:20 CST 2020
     */
    @Delete({
        "delete from markup_level_agent_price",
        "where mch_id = #{mch_id,jdbcType=INTEGER}",
          "and type_id = #{type_id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(markup_level_agent_priceKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_level_agent_price
     *
     * @mbggenerated Fri Jul 17 18:25:20 CST 2020
     */
    @Insert({
        "insert into markup_level_agent_price (mch_id, type_id, ",
        "type_level, create_time, ",
        "update_time)",
        "values (#{mch_id,jdbcType=INTEGER}, #{type_id,jdbcType=INTEGER}, ",
        "#{type_level,jdbcType=INTEGER}, #{create_time,jdbcType=TIMESTAMP}, ",
        "#{update_time,jdbcType=TIMESTAMP})"
    })
    int insert(markup_level_agent_price record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_level_agent_price
     *
     * @mbggenerated Fri Jul 17 18:25:20 CST 2020
     */
    @InsertProvider(type=markup_level_agent_priceSqlProvider.class, method="insertSelective")
    int insertSelective(markup_level_agent_price record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_level_agent_price
     *
     * @mbggenerated Fri Jul 17 18:25:20 CST 2020
     */
    @SelectProvider(type=markup_level_agent_priceSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="mch_id", property="mch_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type_id", property="type_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type_level", property="type_level", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="update_time", jdbcType=JdbcType.TIMESTAMP)
    })
    List<markup_level_agent_price> selectByExample(markup_level_agent_priceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_level_agent_price
     *
     * @mbggenerated Fri Jul 17 18:25:20 CST 2020
     */
    @Select({
        "select",
        "mch_id, type_id, type_level, create_time, update_time",
        "from markup_level_agent_price",
        "where mch_id = #{mch_id,jdbcType=INTEGER}",
          "and type_id = #{type_id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="mch_id", property="mch_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type_id", property="type_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type_level", property="type_level", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="update_time", jdbcType=JdbcType.TIMESTAMP)
    })
    markup_level_agent_price selectByPrimaryKey(markup_level_agent_priceKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_level_agent_price
     *
     * @mbggenerated Fri Jul 17 18:25:20 CST 2020
     */
    @UpdateProvider(type=markup_level_agent_priceSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") markup_level_agent_price record, @Param("example") markup_level_agent_priceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_level_agent_price
     *
     * @mbggenerated Fri Jul 17 18:25:20 CST 2020
     */
    @UpdateProvider(type=markup_level_agent_priceSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") markup_level_agent_price record, @Param("example") markup_level_agent_priceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_level_agent_price
     *
     * @mbggenerated Fri Jul 17 18:25:20 CST 2020
     */
    @UpdateProvider(type=markup_level_agent_priceSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(markup_level_agent_price record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_level_agent_price
     *
     * @mbggenerated Fri Jul 17 18:25:20 CST 2020
     */
    @Update({
        "update markup_level_agent_price",
        "set type_level = #{type_level,jdbcType=INTEGER},",
          "create_time = #{create_time,jdbcType=TIMESTAMP},",
          "update_time = #{update_time,jdbcType=TIMESTAMP}",
        "where mch_id = #{mch_id,jdbcType=INTEGER}",
          "and type_id = #{type_id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(markup_level_agent_price record);
}